package updown.domain;

import cn.hutool.core.util.CharsetUtil;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.nio.charset.Charset;

/**
 * <p>Title: ww.kaixin.downupservice.domain </p>
 * <p>Description:updown: -  </p>
 *
 * @Author:jiangkaixin
 * @Date:2021/11/3
 * @Version: 1.0
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class ServerHost extends BaseEntity {
    private String name;
    private String host;
    private int port;
    private String user;
    private String password;
    /**
     * 编码格式
     */
    private Charset charset = CharsetUtil.CHARSET_UTF_8;

    public Charset getCharset() {
        return charset;
    }

    public ServerHost(String host, int port) {
        this.host = host;
        this.port = port;
    }

    @Override
    public String toString() {
        return "ServerHost{" +
                "name='" + name + '\'' +
                ", host='" + host + '\'' +
                ", port=" + port +
                ", user='" + user + '\'' +
                ", charset=" + charset +
                '}';
    }
}
